package jee.boot.entity.auth;

import jee.boot.common.annotation.Column;
import jee.boot.common.annotation.Table;
import jee.boot.common.basic.interceptor.impl.DefaultPreInsertInterceptor;
import jee.boot.common.basic.interceptor.impl.DefaultPreQueryInterceptor;
import jee.boot.common.basic.interceptor.impl.DefaultPreUpdateInterceptor;
import jee.boot.entity.system.BasicObj;

/**
 * 单元格集
 */
@Table(name = "mt_cellset")
public class CellSet extends BasicObj<CellSet> {

    private static final long serialVersionUID = 1L;

    /**
     * 模型ID
     */
    @Column(name = "st_model_id",data = {"modelData.id","modelData.no","modelData.code","modelData.name","modelData.desc","modelData.type","modelData.modelTableName"})
    private ModelData modelData;//引用：ST_MODEL
    /**
     * 列ID
     */
    @Column(name = "st_column_id",data = {"columnData.id","columnData.no","columnData.code","columnData.name","columnData.desc","columnData.type"})
    private jee.boot.entity.auth.Column columnData;//引用：MT_COLUMN
    /**
     * 记录集ID
     */
    @Column(name = "st_rowset_id",data = {"rowSet.id","rowSet.no","rowSet.code","rowSet.name","rowSet.desc","rowSet.type"})
    private RowSet rowSet;//引用：MT_ROWSET
    /**
     * 超类ID
     */
    @Column(name = "st_super_id",data = {"superCellSet.id","superCellSet.no","superCellSet.code","superCellSet.name","superCellSet.desc","superCellSet.type"})
    private CellSet superCellSet;//引用：MT_CELLSET
    /**
     * 虚拟标志
     */
    @Column(name = "st_virtual_flag")
    private String virtualFlag;//字典：DIC_SYS_YesNo，用于预定义的不用于业务使用的超类对象


    public CellSet() {
    }

    public CellSet(String id) {
        super(id);
    }

    public ModelData getModelData() {
        return modelData;
    }

    public void setModelData(ModelData modelData) {
        this.modelData = modelData;
    }

    public jee.boot.entity.auth.Column getColumnData() {
        return columnData;
    }

    public void setColumnData(jee.boot.entity.auth.Column columnData) {
        this.columnData = columnData;
    }

    public RowSet getRowSet() {
        return rowSet;
    }

    public void setRowSet(RowSet rowSet) {
        this.rowSet = rowSet;
    }

    public CellSet getSuperCellSet() {
        return superCellSet;
    }

    public void setSuperCellSet(CellSet superCellSet) {
        this.superCellSet = superCellSet;
    }

    public String getVirtualFlag() {
        return virtualFlag;
    }

    public void setVirtualFlag(String virtualFlag) {
        this.virtualFlag = virtualFlag;
    }
    @Override
    public void preInsert() {
        new DefaultPreInsertInterceptor().execute(this);
    }
    @Override
    public void preUpdate() {
        new DefaultPreUpdateInterceptor().execute(this);
    }
    @Override
    public void preQuery() {
        new DefaultPreQueryInterceptor().execute(this);
    }
}
